/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package perplexity;

/**
 *
 * @author Martin Haulrich
 */
public class Main {

    public static void main(String[] args) throws Exception {

        // -526267.750140258
        if (true) {
            EstimatorPer gt = new ARPALMEstimator("/Users/mwh/lm-test/da/knm1k-tri.lm");
            PerplexityCalculator pgt = new PerplexityCalculator(gt, 3);
            System.err.println(pgt.calculate("/Users/mwh/lm-test/da/eval.da-1000.txt"));
            System.err.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
        }

        
        if (false) {
            String priorTrainFilename = args[0];
            String ocFilename = args[1];
            String evalFilename = args[2];

            priorTrainFilename = "/Users/mwh/lm-test/da/train.da-1000.txt";
////               ocFilename = "/Users/mwh/Documents/NetBeansProjects/kalkyl-trained/oc-b20-d5-m5";
//            // 4841
            ocFilename = "/Users/mwh/Java/XHPM-MWH/output/test";
            evalFilename = "/Users/mwh/lm-test/da/eval.da-1000.txt";

            EstimatorPer oce = new OCsufestimator(priorTrainFilename, ocFilename, 3, null);

            PerplexityCalculator poc = new PerplexityCalculator(oce, 3);
            long a = System.currentTimeMillis();
            System.err.println(poc.calculate(evalFilename));
            long b = System.currentTimeMillis();
            System.err.println("Calculation took: " + (b - a) + "ms");
        }
    }
}
